<template>
  <div class="home-page">
    <!-- 导航栏 -->


    <!-- 主要内容区域 -->
    <div class="main-content">
      <!-- 头部介绍区域 -->
      <div class="hero-section">
        <h1 class="hero-title">{{ pageInfo.title }}</h1>
        <p class="hero-subtitle">{{ pageInfo.subtitle }}</p>
        <div class="hero-tags">
          <span v-for="tag in pageInfo.tags" :key="tag" class="tech-tag">
            {{ tag }}
          </span>
        </div>
      </div>

      <!-- 统计卡片区域 -->
      <div class="stats-section">
        <div class="stats-container">
          <div v-for="stat in statsData" :key="stat.title" class="stat-card" :class="stat.type">
            <div class="stat-icon">
              <component :is="stat.icon" />
            </div>
            <div class="stat-content">
              <div class="stat-title">{{ stat.title }}</div>
              <div class="stat-value">{{ stat.value }}</div>
              <div class="stat-desc">{{ stat.desc }}</div>
            </div>
          </div>
        </div>
      </div>

      <!-- 技术栈详情区域 -->
      <div class="tech-details-section">
        <h2 class="section-title">{{ techSection.title }}</h2>
        <div class="tech-grid">
          <div v-for="category in techSection.categories" :key="category.title" class="tech-category">
            <h3>
              <component :is="category.icon" />
              {{ category.title }}
            </h3>
            <div class="tech-list">
              <span v-for="tech in category.techs" :key="tech" class="tech-item">
                {{ tech }}
              </span>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
// 配置页面为非 SSR（客户端渲染）
definePageMeta({
  ssr: false
})
import {
  CalendarOutlined,
  ToolOutlined,
  ProjectOutlined,
  ClusterOutlined,
  LaptopOutlined,
  CloudServerOutlined,
  DeploymentUnitOutlined
} from '@ant-design/icons-vue'




// 页面信息
const pageInfo = {
  title: '廖子乔的技术博客',
  subtitle: '高级全栈工程师 | 6.5年开发经验 | 技术创造价值',
  tags: ['Nuxt.js', 'Prisma', 'Docker', 'MySQL', '全栈开发']
}

// 统计数据
const statsData = [
  {
    type: 'experience',
    icon: CalendarOutlined,
    title: '开发经验',
    value: '6.5年',
    desc: '前端 & 全栈开发'
  },
  {
    type: 'tech',
    icon: ToolOutlined,
    title: '技术栈',
    value: '15+',
    desc: '熟练掌握技术'
  },
  {
    type: 'projects',
    icon: ProjectOutlined,
    title: '项目经验',
    value: '30+',
    desc: '成功交付项目'
  },
  {
    type: 'architecture',
    icon: ClusterOutlined,
    title: '系统架构',
    value: '10+',
    desc: '大型系统设计'
  }
]

// 技术栈数据
const techSection = {
  title: '技术专长',
  categories: [
    {
      title: '前端技术',
      icon: LaptopOutlined,
      techs: [
        'Vue.js / Nuxt.js',
        'React / Next.js',
        'TypeScript',
        'Ant Design',
        'Webpack / Vite'
      ]
    },
    {
      title: '后端技术',
      icon: CloudServerOutlined,
      techs: [
        'Node.js / Express',
        'Prisma ORM',
        'MySQL / PostgreSQL',
        'Redis',
        'RESTful API'
      ]
    },
    {
      title: 'DevOps',
      icon: DeploymentUnitOutlined,
      techs: [
        'Docker',
        'CI/CD',
        'Nginx',
        'Linux服务器',
        'AWS / 阿里云'
      ]
    }
  ]
}

useHead({
  title: '廖子乔 - 高级全栈工程师 | 技术博客'
})
</script>

<style scoped>
.home-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: white;
}

/* 导航栏样式 */
.navbar {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
}

.nav-menu {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
}

/* 主要内容区域 */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* 头部介绍区域 */
.hero-section {
  text-align: center;
  padding: 60px 0 40px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 32px;
  opacity: 0.9;
}

.hero-tags {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tech-tag {
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.tech-tag:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* 统计卡片区域 */
.stats-section {
  margin: 60px 0;
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
  min-height: 120px;
}

.stat-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-icon {
  font-size: 2.5rem;
  opacity: 0.8;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
}

.stat-title {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-desc {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* 技术详情区域 */
.tech-details-section {
  margin-top: 80px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  font-weight: 600;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.tech-category {
  background: rgba(255, 255, 255, 0.08);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.tech-category h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: #fff;
  font-weight: 600;
}

.tech-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tech-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tech-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    height: auto;
    padding: 16px 0;
  }

  .nav-menu {
    margin: 16px 0;
    gap: 16px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .stats-container {
    grid-template-columns: 1fr;
  }

  .tech-grid {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: 20px 16px;
  }

  .tech-details-section {
    padding: 24px;
    margin-top: 40px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .stat-card {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .stat-icon {
    font-size: 2rem;
  }

  .stat-value {
    font-size: 1.8rem;
  }
}
</style>